package com.haiya.decorator.basic;

/**
 * 抽象装饰器
 * 抽象装饰器不对组件行为做任何改变，直接在内部调用组件的具体方法。
 */
public class Decorator implements Component {
    protected Component component;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void operation() {
        System.out.println("抽象装饰器 ~~~~~~~~~");
        component.operation();
    }
}
